package com.easytopit.userServiceImpl;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.easytopit.demain.User;
import com.easytopit.userDao.UserDao;
import com.easytopit.userService.UserService;
@Service
public class UserServiceImpl implements UserService{
	
	@Autowired
	private UserDao userDao;
	@Override
	public boolean schedule(String userName, String phone, String receiverPeople, String goodName, String goodWeight,
			Timestamp createTime,int orderId,String address,String longe,String wide,String height) {
		boolean user = userDao.schedule(userName, phone, receiverPeople, goodName, goodWeight, Timestamp.valueOf(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())),address,orderId,longe, wide,height);
		
		return user == true;
	}
	@Override
	public List<User> query(int orderId) {
		// TODO Auto-generated method stub
		return userDao.query(orderId);
	}
}
